OnDeviceStateChangeListener

Definition for a callback from an IDeviceCompat instance on a connection state change, battery state change, or external power state change.

Functions

Link copied to clipboard
open fun onBatteryStateChanged(sender: IDeviceCompat, newState: Int)

Called when the Nix device has updated its battery level measurement.

Link copied to clipboard
abstract fun onConnected(sender: IDeviceCompat)

Called when the Nix device has completed the connection process and is now idle.

Link copied to clipboard
abstract fun onDisconnected(sender: IDeviceCompat, status: DeviceStatus)

Called when the Nix device has disconnected from the host.

Link copied to clipboard
open fun onExtPowerStateChanged(sender: IDeviceCompat, newState: Boolean)

Called when the Nix device has been connected or disconnected from an external power source.